<template>
    <div class="main">
        <VueMarkdown :source="src"/>
    </div>
</template>

<script lang="ts" setup>
import {computedAsync} from "@vueuse/core";
import VueMarkdown from "vue-markdown-render";
import {get_markdown_file} from "../utils";
import {useI18n} from "vue-i18n";

const file_name ="home";
const {locale} = useI18n();

const src = computedAsync(
    async () => await get_markdown_file(`${file_name}_${locale.value}.md`),
    ""
);
</script>

<style scoped>
.main {
    width: 80%;
    margin: 0 auto;
}
</style>